home *** CD-ROM | disk | FTP | other *** search
- unit MsgSendU;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ComCtrls;
-
- type
- TMsgSendForm = class(TForm)
- edtWParam: TEdit;
- edtLParam: TEdit;
- updWParam: TUpDown;
- updLParam: TUpDown;
- Label1: TLabel;
- Label2: TLabel;
- btnBroadcast: TButton;
- btnBroadcast2: TButton;
- procedure btnBroadcastClick(Sender: TObject);
- procedure btnBroadcast2Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- MsgSendForm: TMsgSendForm;
-
- implementation
-
- uses
- CustomMsgU;
-
- {$R *.DFM}
-
- procedure TMsgSendForm.btnBroadcastClick(Sender: TObject);
- begin
- WinExec('MsgRcv1.Exe', sw_ShowNormal);
- SendMessage(HWnd_BroadCast, wm_ClinicMessage,
- updWParam.Position, updLParam.Position)
- end;
-
- procedure TMsgSendForm.btnBroadcast2Click(Sender: TObject);
- var
- Recipients: DWord;
- begin
- WinExec('MsgRcv1.Exe', sw_ShowNormal);
- Recipients := BSM_APPLICATIONS;
- //Can make message be sent to all applications except this one
- BroadcastSystemMsg(BSF_IGNORECURRENTTASK, @Recipients,
- wm_ClinicMessage, updWParam.Position, updLParam.Position)
- end;
-
- end.
-